/*
 * Author: Jeff Liu(jebberwocky@gmail.com)
 * Date: Sep 7, 2010 10:57:11 PM
 * 
 * License: MIT
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 
 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
 * FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 
 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 */
package org.gglgeo.ggl;

import java.util.List;

import org.gglgeo.core.GeoResultStatus;

/**
 * The Class GeoResult.
 */
public class GeoResult {
	
	public GeoResult(GeoResultStatus status) {
		super();
		Status = status;
	}
	public GeoResult() {
		// TODO Auto-generated constructor stub
	}
	private GeoResultStatus Status;
    private List<GeoObj> Results;

    public GeoResultStatus getStatus() {
		return Status;
	}
	public void setStatus(GeoResultStatus status) {
		Status = status;
	}
	public List<GeoObj> getResults() {
		return Results;
	}
	public void setResults(List<GeoObj> results) {
		Results = results;
	}
	
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((Status == null) ? 0 : Status.hashCode());
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		GeoResult other = (GeoResult) obj;
		if (Status == null) {
			if (other.Status != null)
				return false;
		} else if (!Status.equals(other.Status))
			return false;
		return true;
	}
	
	public static final GeoResult NotDefinedResult = new GeoResult(GeoResultStatus.UNKNOWN);
    public static final GeoResult BlankResult = new GeoResult(GeoResultStatus.ZERO_RESULTS);
}
